<%--
 *  File:    ApprovalNotesInfo.jsp
 *  @Author: CunZhang 
 *  Date:    2002/02/27
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.ApprovalNotesInfo");  
  String strModuleName = "BIEE";
	String contextPath = request.getContextPath();
%>



<%@ include file="/inc/PageDefault.inc" %>
<html>
<head>
<title>ApprovalNotesInfo</title>
<PageFlow:CheckPageFlow pageName="approvalnotesinfo"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script type="text/javascript" src="<%=contextPath%>/js/opal2/mootools.js"></script>
<%
  HashMap notesInfo = (HashMap)pageContext.getAttribute("notesinfo");
  if(notesInfo == null)
    notesInfo = new HashMap();
  
  HashMap userinfo = (HashMap)session.getAttribute("userinfo");
%>
<script>
function editMode(obj,name,id) {
    if ($(name) == null) {
        var c = Trim(obj.innerText);
        var t = new Element('input', {
            'type':'text',
            'value':c,
            'styles':{
                    'width':'900px'
                     },
            'id':name,
            'name':name,
            'events':{
                'blur':function() {
                    saveData(this,id,c);
                },
                'keydown':function() {
                    if (event.keyCode == 13) {
                        saveData(this,id,c);
                    }
                }
            }
        });
       
        obj.innerHTML = '&nbsp;';
        t.inject(obj);
        selectText(t);
    }
}

function saveData(obj,id,c) {
    var p = obj.parentNode;
    p.innerHTML = obj.value;
    var req = new Request({
        'url':'<%=contextPath%>/Dispatcher',
        'method':'get',
        'data':'pagename=approvalfailtempdetail&actionname=save&columnname=' + obj.name + '&columnvalue='+ encodeURI(obj.value) + '&transactionid=' + id
    });
    req.send(); 
    window.location.reload();
}

//选中文本框中的字符



function selectText(obj) {
    var range = obj.createTextRange();
    range.moveStart("character", 0);
    range.select();
}
</script>
</
</head>
<body>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
  <tr> 
    <td> 
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="2" class="summary_top"></td>
        </tr>
        <tr> 
          <td colspan="2"><img src="../images/<%= strLanguageCode %>/quote.gif" width="16" height="11"> 
           &nbsp; <%= label.getLabelName("L_ApprovalSuggestion") +  label.getLabelName("L_Colon") %></td>
        </tr>
      </table>
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
        <tr> 
          <td class="td-text" width="81">&nbsp;<%= label.getLabelName("L_Title") +  label.getLabelName("L_Colon") %></td>
          <td colspan="3">&nbsp;<custom:write property="title" name="notesinfo"  nbsp="true"/></td>
        </tr>
        <tr> 
          <td class="td-text">&nbsp;<%= label.getLabelName("L_Content") +  label.getLabelName("L_Colon") %></td>
          
          <!--<td colspan="3">&nbsp;<custom:write property="content" name="notesinfo"  nbsp="true"/></td>-->
   
			<% if  (notesInfo.get("fromuserid")==null){ %>
			
			 <td colspan="3">&nbsp;&nbsp;</td>
			<%} %>
             <% if (notesInfo.get("fromuserid")!=null) { 
            	 
            	 if ( ((Integer)userinfo.get("userid")).intValue()==(((Integer)notesInfo.get("fromuserid")).intValue())){%>
            <td colspan="3" onclick="editMode(this,'nc',<%=JspHelper.filterNull( notesInfo.get("notesid"))%>);"><%=JspHelper.filterNull( notesInfo.get("content"))%>&nbsp;&nbsp;</td>
      			 <%} else { %>
            <td colspan="3">&nbsp;&nbsp;</td>
      		<%} }%>	 
      			 

        </tr>
        <tr> 
          <td class="td-text">&nbsp; <%= label.getLabelName("L_DisapprovalPer") +  label.getLabelName("L_Colon") %></td>
          <td> &nbsp;<custom:write property="fromusername" name="notesinfo"  nbsp="true"/></td>
          <td width="90" class="td-text">&nbsp;<%= label.getLabelName("L_RelatedEvents") +  label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<custom:write property="transactioncode" name="notesinfo"  nbsp="true"/></td>
        </tr>
        <tr> 
          <td class="td-text">&nbsp;<%= label.getLabelName("L_BuildDate") +  label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<custom:write property="begindate" name="notesinfo"  nbsp="true"/></td>
          <td class="td-text">&nbsp;<%= label.getLabelName("L_ExpireDate") +  label.getLabelName("L_Colon") %></td>
          <td>&nbsp;<custom:write property="enddate" name="notesinfo"  nbsp="true"/></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td class="summary_top"></td>
  </tr>
  <tr> 
    <td class="td_center"><a onclick="self.location.href='about:blank';"><custom:button type="1" label="L_Back" imgsrc="back.gif" border="0" style="width:60"/></a></td>
  </tr>
</table>
</body>
</html>



